/
NotificationTypeAction.cs
89 lines (75 loc) · 3.33 KB
/
NotificationTypeAction.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Services.Social.Notifications
{
using System;
using System.Data;
using System.Xml.Serialization;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities;
using DotNetNuke.Entities.Modules;
using Newtonsoft.Json;
/// Project: DotNetNuke
/// Namespace: DotNetNuke.Services.Social.Notifications
/// Class: NotificationTypeAction
/// <summary>The NotificationTypeAction class describes a single notification type action that can be associated to a message.</summary>
[Serializable]
public class NotificationTypeAction : BaseEntityInfo, IHydratable
{
private int notificationTypeActionId = -1;
/// <summary>Gets or sets the notification type action identifier.</summary>
[XmlAttribute]
public int NotificationTypeActionId
{
get
{
return this.notificationTypeActionId;
}
set
{
this.notificationTypeActionId = value;
}
}
/// <summary>Gets or sets the notification type identifier.</summary>
[XmlAttribute]
public int NotificationTypeId { get; set; }
/// <summary>Gets or sets the notification type action name resource key.</summary>
[XmlAttribute]
public string NameResourceKey { get; set; }
/// <summary>Gets or sets the notification type action description resource key.</summary>
[XmlAttribute]
public string DescriptionResourceKey { get; set; }
/// <summary>Gets or sets the notification type action confirmation resource key.</summary>
[XmlAttribute]
public string ConfirmResourceKey { get; set; }
/// <summary>Gets or sets the notification type action order to be used while displaying the list of available actions.</summary>
[XmlAttribute]
public int Order { get; set; }
/// <summary>Gets or sets the Service Framework URL to be called when the action is performed.</summary>
[XmlAttribute]
public string APICall { get; set; }
/// <summary>Gets or sets iHydratable.KeyID.</summary>
[XmlIgnore]
[JsonIgnore]
public int KeyID
{
get { return this.NotificationTypeActionId; }
set { this.NotificationTypeActionId = value; }
}
/// <summary>Fill the object with data from database.</summary>
/// <param name="dr">the data reader.</param>
public void Fill(IDataReader dr)
{
this.NotificationTypeActionId = Convert.ToInt32(dr["NotificationTypeActionID"]);
this.NotificationTypeId = Convert.ToInt32(dr["NotificationTypeID"]);
this.NameResourceKey = dr["NameResourceKey"].ToString();
this.DescriptionResourceKey = Null.SetNullString(dr["DescriptionResourceKey"]);
this.ConfirmResourceKey = Null.SetNullString(dr["ConfirmResourceKey"]);
this.Order = Convert.ToInt32(dr["Order"]);
this.APICall = dr["APICall"].ToString();
// add audit column data
this.FillInternal(dr);
}
}
}